<template>
    <div class="container">
        <el-card class="box-card" shadow="none">
            <div slot="header" class="clearfix">
                <el-page-header @back="goBack" :content="'团成员'"></el-page-header>
            </div>
            <div class="itinerary_detail_content">
                <TableCard title="团成员列表" :table_data="table_data" :table_item="table_item" :user="'list'" @row_id="row_id"
                    :oper_visible="false" :loading="loading" />
            </div>

        </el-card>

    </div>
</template>

<script>
import TableCard from '../reusable_components/table_card.vue';
import SvgIcon from '@/components/reusable_components/SvgIcon.vue';
export default {
    components: {
        SvgIcon,
        TableCard,
    },

    data() {
        return {
            table_item: [
                { key: 'name', value: '姓名' },
                { key: 'gender', value: '性别' },
                { key: 'age', value: '年龄' },
                { key: 'phone', value: '联系方式' },
            ],

            table_data: [],
            loading: true
        }
    },

    mounted() {
        this.get_member_list()
    },

    methods: {
        // 返回上一页
        goBack() {
            this.$router.back()
        },

        row_id(val) {
            console.log(val)
        },

        async get_member_list() {
            this.loading = true
            const res = await this.$http.post("/itinerary/findgroupmate", {
                // 携带数据
                g_id: sessionStorage.user_id,
                pageNum: 1,
                pageSize: 100
            });
            let index = res.data.data.information.findIndex(item => item.name === '系统监控');
            res.data.data.information.splice(index, 1)
            this.table_data = res.data.data.information
            this.loading = false
        },

        logout() { },
    }
}
</script>

<style lang="less" scoped>
.container {
    width: 61.8vw;
    min-width: 950px;
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0%);

    .itinerary_detail_content {
        height: 80vh;
        overflow: auto;

        -ms-overflow-style: none;
        /* IE 10+ */

        scrollbar-width: none;
        /* Firefox */

    }

    .itinerary_detail_content::-webkit-scrollbar {
        display: none;
        /* Chrome Safari */
    }

}

.box-card {
    border: 0;
}
</style>